<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>登的高</title>
  <script src="../vue.min.js"></script>
</head>
<body>
<div id="app">
  <!-- 父级模板 -->
  <child on-load="{{onChildLoaded}}"></child>
</div>
<script>
  Vue.component('child', {
    props: ['onLoad'],
    ready: function (){
      this.onLoad('message from child')
    }
  });
  new Vue({
    el: '#app',
    methods: {
      onChildLoaded: function (msg){
        console.log(msg);
      }
    }
  })
</script>
</body>
</html>